Automated recording and playback of application interactions

ABSTRACT

Some embodiments of automated recording and playback of application interactions have been presented. In one embodiment, an application proxy server communicatively coupled between an application server and a client records responses and requests between an application server and a client during a transaction. Furthermore, the application proxy server generates a script based on the responses and requests recorded.

TECHNICAL FIELD

Embodiments of the present invention relate to application interactions, and more specifically to recording and playback of application interactions using an application proxy.

BACKGROUND

As the use of computers become more popular and common in the everyday life of people, many applications are developed for various different usages. An application as used herein generally refers to a program or a suite of programs executable by one or more processors to perform one or more tasks and/or functions. Currently, many applications are developed to conduct transactions between multiple machines (e.g., servers and clients). These transactions may or may not be carried over a network. Moreover, these applications may or may not interact with other applications (e.g., requesting information from another application, providing data to another application, updating records using another application, etc.).

An important part of the development of applications is quality assurance, which involves testing of applications. For applications that interact with other applications and/or users, tests are needed to test the way the applications interact with each other. Currently, software developers routinely test such applications by manually interacting with these applications to emulate interaction with other applications and/or users in a variety of scenarios.

The above approach to test applications suffers from many disadvantages. First, the above approach is labor intensive because it requires a quality assurance engineer to manually create a series of predetermined user interactions and/or application interactions with the application under test. Further, additional effort is needed to analyze the test result. When the test has to be re-executed in order to test another revision of the application, the quality assurance engineer has to manually repeat the above procedures.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention is illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:

FIG. 1 illustrates one embodiment of a system in which embodiments of the present invention may be implemented.

FIG. 2 illustrates a functional block diagram of one embodiment of an application proxy server.

FIG. 3A illustrates a flow diagram of one embodiment of a process to script requests and responses in a transaction.

FIG. 3B illustrates a flow diagram of one embodiment of a process to test an application.

FIG. 4 illustrates a block diagram of an exemplary computer system.

DETAILED DESCRIPTION

Described herein are some embodiments of automated recording and playback of application interactions. In one embodiment, an application proxy server communicatively coupled between an application server and a client records responses and requests between the application server and the client during a transaction. Furthermore, the application proxy server generates a script based on the responses and requests recorded. The script may be executed to replay the transaction. A transaction as used herein broadly refers to a series of exchanges between an application and another entity, which may include one or more of a user, another application, a client machine, etc. One example of a transaction is a session that begins with a user logging into an online banking application and ends with the user logging out of the online banking application. In this example, the other entity includes the user and a client machine on which a user interface of the online banking application is displayed. Data (e.g., account number, passwords, etc.) and instructions (e.g., requests to transfer funds from one account to another account, requests to view details of an account, etc.) may be exchanged between the user and the online banking application during the transaction. More details of some embodiments of the automated recording and playback of application interactions are described below.

In the following description, numerous details are set forth. It will be apparent, however, to one skilled in the art, that the present invention may be practiced without these specific details. In some instances, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring the present invention.

Some portions of the detailed descriptions below are presented in terms of algorithms and symbolic representations of operations on data bits within a computer memory. These algorithmic descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. An algorithm is here, and generally, conceived to be a self-consistent sequence of operations leading to a desired result. The operations are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated. It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like.

It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the following discussion, it is appreciated that throughout the description, discussions utilizing terms such as “processing” or “computing” or “calculating” or “determining” or “displaying” or the like, refer to the action and processes of a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission, or display devices.

The present invention also relates to apparatus for performing the operations herein. This apparatus may be specially constructed for the required purposes, or it may comprise a general-purpose computer selectively activated or reconfigured by a computer program stored in the computer. Such a computer program may be stored in a machine-readable storage medium, such as, but is not limited to, any type of disk including floppy disks, optical disks, CD-ROMs, and magnetic-optical disks, read-only memories (ROMs), random access memories (RAMs), EPROMs, EEPROMs, magnetic or optical cards, or any type of media suitable for storing electronic instructions, and each coupled to a computer system bus.

The algorithms and displays presented herein are not inherently related to any particular computer or other apparatus. Various general-purpose systems may be used with programs in accordance with the teachings herein, or it may prove convenient to construct more specialized apparatus to perform the required operations. The required structure for a variety of these systems will appear from the description below. In addition, the present invention is not described with reference to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the invention as described herein.

FIG. 1 illustrates one embodiment of a system in which embodiments of the present invention may be implemented. The system 100 includes a client machine 110, an application proxy server 120, and an application server 130. The client machine 110 is coupled to the application proxy server 120, which is further coupled to the application server 130. The client machine 110 may include a computing machine, such as a desktop personal computer (PC), a laptop PC, a personal digital assistant (PDA), a mobile telephone, etc. In some embodiments, a network access application (e.g., a browser, an electronic mail engine, etc.) is executable on the client machine 110. The application proxy server 120 may be implemented using a computing machine, such as the one illustrated in FIG. 4. The application proxy server 120 is further coupled to the application server 130. The application server 130 may communicate with the client machine 110 via the application proxy server 120, which serves as an intermediary between the client machine 110 and the application server 130. The application server 130 may be implemented using a computing machine, such as the one illustrated in FIG. 4, that is operable to execute an application. An application as used herein broadly refers to a program or a suite of program having instructions executable by a computing machine to perform one or more tasks. The client machine 110, the proxy server 120, and the application server 130 may be coupled to each other via one or more networks, such as a local area network (LAN), an intranet, the Internet, etc.

Note that any or all of the components of the system 100 and associated hardware may be used in various embodiments of the present invention. However, it can be appreciated that other configurations of the system 100 may include more or fewer devices than those discussed above

In some embodiments, a user of the client machine 110 accesses an application provided by the application server 130. The series of exchanges between the user and the application is referred to as a transaction herein. It is generally useful to record information on the transaction so that the transaction may be played back for various purposes (e.g., debugging, quality assurance, etc.). The information may include requests and responses (including data) transmitted between the client machine 110 and the application server 130 via the application proxy server 120. The information on the transaction may be recorded in response to a request from the user. Alternatively, a system administrator of the system 100 may initiate a request to record the information, subject to approval or consent by the user. In response to the request, a transaction recording module 122 within the application proxy server 120 records the information of the transaction.

In some embodiments, a scripting engine 124 in the application proxy server 120 may automatically generate a script based on the information of the transaction recorded. The application proxy server 120 may execute the script later to replay the transaction recorded without requiring the user to participate in the replay. Playing back the transaction generally refers to repeating the transaction in substantially the same manner as the transaction has been carried out earlier. Such a script is useful for various purposes, such as debugging the application, testing a new release or version of the application, etc. By automating the script generation process, both time and labor may be saved in quality assurance. Furthermore, the script provides real-life test cases for testing the application, which may be more effective in uncovering potential problems with the application than hypothetical test cases.

Note that the recording of the transaction described above may be done over secured connections and/or non-secured connections between the client machine 110, the application proxy server 120, and the application server 130. One example of a secured connection is a secure hypertext transfer protocol (HTTPS) connection. In some embodiments, where sensitive and/or private data is entered during the transaction (e.g., passwords to log into a bank account, personal information, such as credit card numbers, social security number, etc.), the above transaction recording may be performed over secured connections to protect the data.

In an alternate embodiment, the application proxy server 120 and the application server 130 may be merged together. In other words, a single server may execute the application as well as an application proxy to act as an intermediary between the application and the client machine 110. The application proxy may carry out tasks in substantially the same way as the application proxy server 120 as described above.

FIG. 2 illustrates a functional block diagram of one embodiment of an application proxy server. The application proxy server 200 may be implemented on a computing device, such as the one described below with reference to FIG. 4. The application proxy server 200 includes a user interface 210, a transaction recording module 220, a scripting engine 230, a playback module 240, and a script replay engine 250, a testing module 260, and a reporting module 270, which are operatively coupled to each other.

In some embodiments, the transaction recording module 220 records information of a transaction between an application server and a client communicatively coupled to the application proxy server during a transaction. The transaction information may include data (e.g., data input by the user at the client), responses, and requests transmitted between the client and the application server via the application proxy server during the transaction. Based on the information recorded, the scripting engine 230 generates a script for replaying the transaction. In some embodiments, the scripting engine 230 generates the script in a general-purpose scripting language, such as Programmable Command Language (PCL). Alternatively, the scripting engine 230 may generate the script in a special-purpose scripting language.

In some embodiments, the user interface module 210 generates a user interface (e.g., a graphical user interface, a text editor, etc.) to allow users (e.g., system administrator) to modify the script generated. As such, the script may be modified to meet different needs in testing the application.

In some embodiments, the testing module 260 tests the application server by causing the script replay engine 250 to execute the script to play back the transaction between the client and the application server. The playback module 240 may identify differences between the earlier recorded transaction and the playback of the transaction, such as, for example, which parts of the responses by the application are different during the playback of the transaction. Identification of these differences is important in testing a new release or version of the application. Furthermore, since the transaction playback is done using the script, which may be played back multiple times readily, the above techniques provide an easy and consistent way to test the application prior to release of new versions of the application. In some embodiments, the playback module 240 may further determine what the differences are between the recorded transaction and the playback.

In some embodiments, the reporting module 270 generates a report on results of the testing. The report may include details on the differences between the recorded transaction and the playback, if any. The reporting module 270 may send the report to users electronically and/or store a copy of the report on the application proxy server 200 for users to access later.

FIG. 3A illustrates a flow diagram of one embodiment of a process to script requests and responses in a transaction between a client and an application server using an application proxy server. The process may be performed by processing logic that may comprise hardware (e.g., circuitry, dedicated logic, programmable logic, microcode, etc.), software (such as instructions run on a processing device), firmware, or a combination thereof. For example, the application proxy server 200 in FIG. 2 may perform at least part of the process in some embodiments.

In some embodiments, the process begins as the transaction to be recorded begins at processing block 310. Processing logic records requests and responses between the client and the application server during the transaction (processing block 320). Processing logic checks if the transaction has ended (processing block 330). If not, processing logic returns to processing block 320 to continue recording. Otherwise, processing logic transitions to processing block 340. At processing block 340, processing logic generates a script based on the requests and responses recorded. Then the process ends.

FIG. 3B illustrates a flow diagram of one embodiment of a process to test the application using the script generated according to FIG. 3A. The process may be performed by processing logic that may comprise hardware (e.g., circuitry, dedicated logic, programmable logic, microcode, etc.), software (such as instructions run on a processing device), firmware, or a combination thereof. For example, the application proxy server 200 in FIG. 2 may perform at least part of the process in some embodiments.

In some embodiments, processing logic enters a test mode (processing block 350). For example, processing logic may set a test flag and/or a test bit to enter the test mode. Then processing logic executes the script previously generated to playback the transaction to test the application (e.g., a new version of the application) (processing block 352). After replaying the transaction, processing logic may examine the replay of the transaction to determine which part of the replay is different from the previously recorded transaction (processing block 354). For example, the timestamps in the replay and the recorded transaction may be different, which may indicate a differences between the response time in the replay and the response time in the recorded transaction.

In some embodiments, processing logic further determines how these parts are different (processing block 356). Referring back to the above example, processing logic may compute the difference in response time using the timestamps in the replay and the recorded transaction. If the difference in the response time exceeds a predetermined limit, then there is likely to be a problem with the responding server. Thus, processing logic may raise a red flag to alert software developers running the test. Processing logic may further examine other information, such as tracking cookies, log files, etc., to account for the differences between the replay and the recorded transaction.

In some embodiments, processing logic generates a report on the results of the test (processing block 358). The report may include information, such as details of the replay, the differences between the replay and the recorded transaction, etc. Processing logic may store the report for users to access later. Alternatively, processing logic may electronically deliver the report (e.g., via electronic mail) to users.

FIG. 4 illustrates a diagrammatic representation of a machine in the exemplary form of a computer system 400 within which a set of instructions, for causing the machine to perform any one or more of the methodologies discussed herein, may be executed. In alternative embodiments, the machine may be connected (e.g., networked) to other machines in a LAN, an intranet, an extranet, and/or the Internet. The machine may operate in the capacity of a server or a client machine in client-server network environment, or as a peer machine in a peer-to-peer (or distributed) network environment. The machine may be a personal computer (PC), a tablet PC, a set-top box (STB), a Personal Digital Assistant (PDA), a cellular telephone, a web appliance, a server, a network router, a switch or bridge, or any machine capable of executing a set of instructions (sequential or otherwise) that specify actions to be taken by that machine. Further, while only a single machine is illustrated, the term “machine” shall also be taken to include any collection of machines that individually or jointly execute a set (or multiple sets) of instructions to perform any one or more of the methodologies discussed herein.

The exemplary computer system 400 includes a processing device 402, a main memory 404 (e.g., read-only memory (ROM), flash memory, dynamic random access memory (DRAM) such as synchronous DRAM (SDRAM) or Rambus DRAM (RDRAM), etc.), a static memory 406 (e.g., flash memory, static random access memory (SRAM), etc.), and a data storage device 418, which communicate with each other via a bus 430.

Processing device 402 represents one or more general-purpose processing devices such as a microprocessor, a central processing unit, or the like. More particularly, the processing device may be complex instruction set computing (CISC) microprocessor, reduced instruction set computing (RISC) microprocessor, very long instruction word (VLIW) microprocessor, or processor implementing other instruction sets, or processors implementing a combination of instruction sets. Processing device 402 may also be one or more special-purpose processing devices such as an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a digital signal processor (DSP), network processor, or the like. The processing device 402 is configured to execute the processing logic 426 for performing the operations and steps discussed herein.

The computer system 400 may further include a network interface device 408. The computer system 400 also may include a video display unit 410 (e.g., a liquid crystal display (LCD) or a cathode ray tube (CRT)), an alphanumeric input device 412 (e.g., a keyboard), a cursor control device 414 (e.g., a mouse), and a signal generation device 416 (e.g., a speaker).

The data storage device 418 may include a machine-accessible storage medium 430 (also known as a machine-readable storage medium) on which is stored one or more sets of instructions (e.g., software 422) embodying any one or more of the methodologies or functions described herein. The software 422 may also reside, completely or at least partially, within the main memory 404 and/or within the processing device 402 during execution thereof by the computer system 400, the main memory 404 and the processing device 402 also constituting machine-accessible storage media. The software 422 may further be transmitted or received over a network 420 via the network interface device 408.

While the machine-accessible storage medium 430 is shown in an exemplary embodiment to be a single medium, the term “machine-accessible storage medium” should be taken to include a single medium or multiple media (e.g., a centralized or distributed database, and/or associated caches and servers) that store the one or more sets of instructions. The term “machine-accessible storage medium” shall also be taken to include any medium that is capable of storing, encoding or carrying a set of instructions for execution by the machine and that cause the machine to perform any one or more of the methodologies of the present invention. The term “machine-accessible storage medium” shall accordingly be taken to include, but not be limited to, solid-state memories, optical and magnetic media, etc.

Thus, some embodiments of automated recording and playback of application interactions have been described. It is to be understood that the above description is intended to be illustrative, and not restrictive. Many other embodiments will be apparent to those of skill in the art upon reading and understanding the above description. The scope of the invention should, therefore, be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled. 

1. A computer-implemented method comprising: recording responses and requests between an application server and a client using an application proxy server communicatively coupled between the application server and the client during a transaction; and generating a script using the application proxy server based on the responses and requests recorded.
 2. The method of claim 1, further comprising: executing the script to play back the transaction between the application server and the client without user interaction.
 3. The method of claim 1, further comprising: creating a user interface to allow users to modify the script generated.
 4. The method of claim 1, further comprising: identifying which parts of the responses recorded are different during a playback of the transaction.
 5. The method of claim 1, further comprising: determining differences between responses that occur during a playback of the transaction and the responses recorded.
 6. The method of claim 1, further comprising: testing the application server by executing the script to play back the transaction; and generating a report on results of the testing.
 7. An application proxy server comprising: a transaction recording module to record responses and requests between an application server and a client communicatively coupled to the application proxy server during a transaction; and a scripting engine coupled to the transaction recording module, to generate a script based on the responses and requests recorded.
 8. The application proxy server of claim 7, further comprising: a script replay engine to execute the script to play back the transaction between the application server and the client without user interaction.
 9. The application proxy server of claim 7, wherein the transaction information comprises data input by a user at the client.
 10. The application proxy server of claim 7, further comprising: a user interface module to create a user interface to allow users to modify the script generated.
 11. The application proxy server of claim 7, further comprising: a playback module coupled to the script replay engine, to identify which parts of the responses recorded are different during a playback of the transaction.
 12. The application proxy server of claim 7, further comprising: a playback module coupled to the script replay engine, to determine differences between responses that occur during a playback of the transaction and the responses recorded.
 13. The application proxy server of claim 7, further comprising: a testing module coupled to the script replay engine, to test the application server by causing the script replay engine to execute the script to play back the transaction; and a reporting module coupled to the testing module, to generate a report on results of the testing.
 14. A system comprising the application proxy server of claim 7, further comprising the application server.
 15. A machine-readable medium that provides instructions that, if executed by a processor, will cause the processor to perform operations comprising: recording responses and requests between an application server and a client using an application proxy server communicatively coupled between the application server and the client during a transaction; and generating a script using the application proxy server based on the responses and requests recorded.
 16. The machine-readable medium of claim 15, further comprising: executing the script to play back the transaction between the application server and the client without user interaction.
 17. The machine-readable medium of claim 15, further comprising: creating a user interface to allow users to modify the script generated.
 18. The machine-readable medium of claim 15, further comprising: identifying which parts of the responses recorded are different during a playback of the transaction.
 19. The machine-readable medium of claim 15, further comprising: determining differences between responses that occur during a playback of the transaction and the responses recorded.
 20. The machine-readable medium of claim 15, further comprising: testing the application server by executing the script to play back the transaction; and generating a report on results of the testing. 